<!--
 * @Author: xuzehan 123@qq.com
 * @Date: 2022-07-13 11:57:50
 * @LastEditors: xuzehan 123@qq.com
 * @LastEditTime: 2022-07-13 15:46:30
 * @FilePath: \vue2-base\src\views\Home.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <a-layout id="components-layout-demo-custom-trigger">
    <a-layout-sider v-model="collapsed" :trigger="null" collapsible>
      <div class="logo">常用功能</div>
      <left-menu />
    </a-layout-sider>
    <a-layout>
      <a-layout-header style="background: #fff; padding: 0">
        <a-icon
          class="trigger"
          :type="collapsed ? 'menu-unfold' : 'menu-fold'"
          @click="() => (collapsed = !collapsed)"
        />
      </a-layout-header>
      <a-layout-content
        :style="{ margin: '24px 16px', padding: '24px', background: '#fff', minHeight: '280px' }"
      >
        <router-view />
      </a-layout-content>
    </a-layout>
  </a-layout>
</template>
<script>
import leftMenu from './layout/menu.vue'
export default {
  components: {
    leftMenu
  },
  data () {
    return {
      collapsed: false,
    }
  },

};
</script>
<style>
#components-layout-demo-custom-trigger,
html,
body {
  width: 100%;
  height: 100%;
}
#components-layout-demo-custom-trigger .trigger {
  font-size: 18px;
  line-height: 64px;
  padding: 0 24px;
  cursor: pointer;
  transition: color 0.3s;
}

#components-layout-demo-custom-trigger .trigger:hover {
  color: #1890ff;
}

#components-layout-demo-custom-trigger .logo {
  height: 32px;
  background: rgba(255, 255, 255, 0.2);
  margin: 16px;
  font-size: 20px;
  text-align: center;
  color: #fff;
  font-weight: bold;
  line-height: 32px;
  font-family: "Microsoft YaHei";
}
</style>
